04. Planning Stage: Step 3 - Determine Events In The App

Determine What Events Happen in the App

We need to take a look at what is happening in each component. Let's determine what actions the app or the user is performing on the data. Is the data being set, modified, or deleted?…then we'll need an action to keep track of that event!

Let's italicize the action and bold the data.

Tweets List Component

The Tweets List Component

The Tweets List Component

For the Tweets List component, the only information that we see is that we'll have to get a list of all of the tweets. So for this component, we just need to:

  • get the tweets

So the action type for event this will probably be something like GET_LIST_OF_TWEETS or GET_DATA.

Tweet Component

The Tweet Component

The Tweet Component

  • We get a particular tweet from a list of tweets.
  • We get the authedUser (user that is currently logged in) so the user can toggle the likes on each tweet.
  • We get the authedUser so the user can reply to a tweet.

Tweet Container Component

The Tweet Container Component

The Tweet Container Component

  • We get a specific tweet from a list of tweets.
  • We get the replies to a specific tweet from a list of tweets.

New Tweet Component

The New Tweet Component

The New Tweet Component

  • We get the authedUser so the user can create a new tweet.
  • We set the text of the new tweet.

Let's move on to Step 4, where we'll determine which of the data above will live in the store.